const app = getApp();

Component({
	/**
	 * 组件的属性列表
	 */
	properties: {
        'showDownloadType':{type:Boolean,value:false},
		'shareid':{type:String,value:''},
		'netSrc':{type:String,value:''},
		'imgSrc':{type:String,value:''},
	},

	/**
	 * 组件的初始数据
	 */
	data: {},

	/**
	 * 组件的方法列表
	 */
	methods: {
		hideModal(){
		   this.setData({
			   showDownloadType:false
		   });

		   this.triggerEvent('showtips',{})

		},

		copyPath() {
			let that = this;
			let path = this.data.netSrc;
			wx.setClipboardData({
				data: path,
				success:function (res) {
					that.hideModal();
					wx.showModal({
						title: '提示',
						content: `方案链接（${path}）已复制,快去分享吧`,
						showCancel: false,
					})
				}
			})

		},

		previewPoster(e) {
			let url = this.data.imgSrc;
			wx.previewImage({
				urls:[url]
			});
		},

	}
});
